import request from '@/utils/request'

//添加学员方法
export function addStudent(data){
  return request({
    url: '/admin/addStudent',
    method: 'post',
    data
  });
}

//检测学员手机号是否可用
export function checkStudentExist(params) {
  return request({
    url: '/admin/checkStudentExist',
    method: 'get',
    params: params
  });
}

//获取学员列表信息
export function studentList(params) {
  return request({
    url: '/admin/allStudentList',
    method: 'get',
    params: params
  });
}

//修改学员约车权限状态
export function updateStudentReserveAuth(data){
  return request({
    url: '/admin/updateStudentReserveAuth',
    method: 'post',
    data
  });
}

//删除学员
export function delStudent(data) {
  return request({
    url: '/admin/delStudent',
    method: 'post',
    data
  });
}

//获取特定学员的信息
export function studentInfo(params) {
  return request({
    url: '/admin/studentInfo',
    method: 'get',
    params: params
  });
}

//更新学员信息
export function updateStudentInfo(data) {
  return request({
    url: '/admin/updateStudentInfo',
    method: 'post',
    data
  });
}

//获取推广奖励信息
export function recommendReward(params) {
  return request({
    url: '/admin/recommendReward',
    method: 'get',
    params: params
  });
}

//获取推广学员列表信息
export function getRecommendInfo(params) {
  return request({
    url: '/admin/recommendList',
    method: 'get',
    params: params
  });
}

//结算推广奖励信息
export function clearReward(data) {
  return request({
    url: '/admin/clearReward',
    method: 'post',
    data
  });
}

//获取约车时间段
export function getTimeLimit(params) {
  return request({
    url: '/admin/practiceTimeByStudent',
    method: 'get',
    params: params
  });
}

//查询练车记录
export function reserveList(params) {
  return request({
    url: '/admin/reserveList',
    method: 'get',
    params: params
  });
}

//取消学员约车记录
export function cancelReserve(data) {
  return request({
    url: '/admin/cancelReserve',
    method: 'post',
    data
  });
}


//更换教练接口
export function changeCoach(data) {
  return request({
    url: '/admin/changeCoach',
    method: 'post',
    data
  });
}

//批量更换教练接口
export function multiChangeCoach(data) {
  return request({
    url: '/admin/multiChangeCoach',
    method: 'post',
    data
  });
}

//获取学员列表[条件查询][超级管理员使用]
export function searchStudentList(params) {
  return request({
    url: '/admin/searchStudentList',
    method: 'get',
    params: params
  });
}

//删除未报名的学员信息[超级管理员使用]
export function delNoApplyStudent(data) {
  return request({
    url: '/admin/delNoApplyStudent',
    method: 'post',
    data
  });
}
